{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "463fc299",
   "metadata": {},
   "source": [
    "# 习题4"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "de32882c",
   "metadata": {},
   "source": [
    "**<font size=5>1.</font>**用消元法解下列方程组：\n",
    "\n",
    "(1)$\\begin{equation*}\n",
    "     \\begin{cases}\n",
    "         x_1-2x_2+3x_3-x_4+2x_5=2 \\\\\n",
    "         3x_1-x_2+5x_3-3x_4+x_5=6 \\\\ \n",
    "         2x_1+x_2+2x_3-2x_4-x_5=8\n",
    "     \\end{cases}\n",
    " \\end{equation*}$；\n",
    " \n",
    " (2)$\\begin{equation*}\n",
    "     \\begin{cases}\n",
    "         2x_1-4x_2+5x_3+3x_4=0 \\\\\n",
    "         3x_1-6x_2+4x_3+2x_4=0 \\\\ \n",
    "         4x_1-8x_2+17x_3+11x_4=0\n",
    "     \\end{cases}\n",
    " \\end{equation*}$；"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "946d6610",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "特解：\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( x_{4} - 2, \\  x_{5} + 4, \\  4, \\  x_{4}, \\  x_{5}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(x4 - 2, x5 + 4, 4, x4, x5)}"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#(1)\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3,x4,x5 = sp.symbols(\"x1 x2 x3 x4 x5\")\n",
    "A = sp.Matrix([[1,-2,3,-1,2],[3,-1,4,-3,1],[2,1,2,-2,-1]])\n",
    "b = sp.Matrix([[2],[6],[8]])\n",
    "b0 = sp.Matrix([[0],[0],[0]])\n",
    "\n",
    "system1 = A,b\n",
    "system0 = A,b0\n",
    "\n",
    "result0 = sp.linsolve(system0,x1,x2,x3,x4,x5)\n",
    "result = sp.linsolve(system1,x1,x2,x3,x4,x5)\n",
    "print('特解：')\n",
    "result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "id": "95fe1d5d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "基础解：\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( x_{4}, \\  x_{5}, \\  0, \\  x_{4}, \\  x_{5}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(x4, x5, 0, x4, x5)}"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print('基础解：')\n",
    "result0"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "634cb474",
   "metadata": {},
   "source": [
    "所以，当$x_4=0,x_5=0$时，有特解$\\eta_0=\\begin{pmatrix}-2 \\\\ 4 \\\\ 4 \\\\ 0 \\\\ 0 \\end{pmatrix}$,当$x_4=1,x_5=0$时，$\\xi_1=\\begin{pmatrix} 1 \\\\ 0 \\\\ 0 \\\\ 1 \\\\ 0 \\end{pmatrix}$，当$x_4=0,x_5=1$时，$\\xi_2=\\begin{pmatrix} 0 \\\\ 1 \\\\ 0 \\\\ 0 \\\\ 1 \\end{pmatrix}$,因此，方程组的通解为：$x=\\eta_0+k_1\\xi_1+k_2\\xi_2(k_1,k_2\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "id": "6f4ba705",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( 2 x_{2} + \\frac{2 x_{4}}{7}, \\  x_{2}, \\  - \\frac{5 x_{4}}{7}, \\  x_{4}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(2*x2 + 2*x4/7, x2, -5*x4/7, x4)}"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#(2)\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3,x4 = sp.symbols(\"x1 x2 x3 x4\")\n",
    "A = sp.Matrix([[2,-4,5,3],[3,-6,4,2],[4,-8,17,11]])\n",
    "b = sp.Matrix([[0],[0],[0]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3,x4)\n",
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4069228e",
   "metadata": {},
   "source": [
    "当$x_2=1,x_4=0$时，$\\xi_1=\\begin{pmatrix} 2 \\\\ 1 \\\\ 0 \\\\ 0 \\end{pmatrix}$，当$x_2=0,x_4=1$时，$\\xi_2=\\begin{pmatrix} \\frac{2}{7} \\\\ 0 \\\\ -\\frac{5}{7} \\\\ 1 \\end{pmatrix}$,因此，方程组的通解为：$x=k_1\\xi_1+k_2\\xi_2(k_1,k_2\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "261a2d38",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "77dc08e4",
   "metadata": {},
   "source": [
    "**<font size=5>2.</font>**$\\lambda$为何值时方程组\n",
    "\n",
    "$\\begin{equation*}\n",
    "     \\begin{cases}\n",
    "         \\lambda x_1+x_2+x_3=0 \\\\\n",
    "         x_1+\\lambda x_2+x_3=0 \\\\ \n",
    "         x_1+x_2+\\lambda x_3=0\n",
    "     \\end{cases}\n",
    " \\end{equation*}$\n",
    " \n",
    " 只有零解？有非零解？并求解"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "a512676e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[-2, 1]\n"
     ]
    }
   ],
   "source": [
    "#只有0解\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "lambda1 = sp.Symbol(\"lambda\")\n",
    "M = sp.Matrix([[lambda1,1,1],[1,lambda1,1],[1,1,lambda1]])\n",
    "print(sp.solve(M.det(),lambda1))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3820b5e0",
   "metadata": {},
   "source": [
    "当$\\lambda\\neq{-2},{1}$时，方程组只有零解"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "9fe831fa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( x_{3}, \\  x_{3}, \\  x_{3}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(x3, x3, x3)}"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 当λ=-2时\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3 = sp.symbols(\"x1 x2 x3\")\n",
    "A = sp.Matrix([[-2,1,1],[1,-2,1],[1,1,-2]])\n",
    "b = sp.Matrix([[0],[0],[0]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3)\n",
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "80e19263",
   "metadata": {},
   "source": [
    "此时，当$x_3=1$时，$\\xi_1=\\begin{pmatrix} 1 \\\\ 1 \\\\ 1 \\end{pmatrix}$，那么方程组的通解为$k_1\\xi_1(k_1\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "6752bac2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - x_{2} - x_{3}, \\  x_{2}, \\  x_{3}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-x2 - x3, x2, x3)}"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#当λ=1时\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3 = sp.symbols(\"x1 x2 x3\")\n",
    "A = sp.Matrix([[1,1,1],[1,1,1],[1,1,1]])\n",
    "b = sp.Matrix([[0],[0],[0]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3)\n",
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a18fcc54",
   "metadata": {},
   "source": [
    "此时，当$x_2=1,x_3=0$时，$\\xi_1=\\begin{pmatrix} -1 \\\\ 1 \\\\ 0 \\end{pmatrix}$，当$x_2=0,x_3=1$时，$\\xi_2=\\begin{pmatrix} -1 \\\\ 0 \\\\ 1 \\end{pmatrix}$，那么方程的通解为$k_1\\xi_1+k_2\\xi_2(k_1,k_2\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "48ab04f3",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "2d919d7a",
   "metadata": {},
   "source": [
    "**<font size=5>3.</font>**当$\\alpha$为何值时方程组\n",
    "\n",
    "$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "x_1  & + & x_2  & - & x_3  &   = 1 \\\\\n",
    "2x_1 & + & 3x_2 & + & ax_3 &   = 3 \\\\\n",
    " x_1 & + & ax_2 & + & 3x_3 &   = 2 \n",
    "\\end{array}\n",
    "\\right.$\n",
    "\n",
    "无解？有唯一解？有无穷多解？在方程组有解时，求其一般解."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "be59ccd0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[-3, 2]\n"
     ]
    }
   ],
   "source": [
    "#有唯一解\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "a = sp.Symbol(\"a\")\n",
    "M = sp.Matrix([[1,1,-1],[2,3,'a'],[1,'a',3]])\n",
    "print(sp.solve(M.det(),a))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "228d9b26",
   "metadata": {},
   "source": [
    "当$\\lambda\\neq{-3},{2}$时，方程组只有零解"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "fa46ecee",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\emptyset$"
      ],
      "text/plain": [
       "EmptySet"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#当a=-3时\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3 = sp.symbols(\"x1 x2 x3\")\n",
    "A = sp.Matrix([[1,1,-1],[2,3,-3],[1,-3,3]])\n",
    "b = sp.Matrix([[1],[3],[2]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3)\n",
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2e93781a",
   "metadata": {},
   "source": [
    "此时，方程组无解"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "id": "464921c3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "特解：\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( 5 x_{3}, \\  1 - 4 x_{3}, \\  x_{3}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(5*x3, 1 - 4*x3, x3)}"
      ]
     },
     "execution_count": 99,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#当a=2时\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3 = sp.symbols(\"x1 x2 x3\")\n",
    "A = sp.Matrix([[1,1,-1],[2,3,2],[1,2,3]])\n",
    "b = sp.Matrix([[1],[3],[2]])\n",
    "b0 = sp.Matrix([[0],[0],[0]])\n",
    "\n",
    "system1 = A,b\n",
    "system0 = A,b0\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3)\n",
    "result0 = sp.linsolve(system0,x1,x2,x3)\n",
    "print('特解：')\n",
    "result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "id": "9be749a8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "基础解：\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( 5 x_{3}, \\  - 4 x_{3}, \\  x_{3}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(5*x3, -4*x3, x3)}"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print('基础解：')\n",
    "result0"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ee271293",
   "metadata": {},
   "source": [
    "此时，当$x_3=1$时，有特解$\\eta_0=\\begin{pmatrix} 5 \\\\ -3 \\\\ 1 \\end{pmatrix}$，当$x_3=1$时，$\\xi_1=\\begin{pmatrix} 5 \\\\ -4 \\\\ 1 \\end{pmatrix}$，那么方程组的通解为$\\eta_0+k_1\\xi_1(k_1\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "40c9db57",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "402f3e60",
   "metadata": {},
   "source": [
    "**<font size=5>4.</font>**下列线性方程组是否有解？有解时求其解.\n",
    "\n",
    "(1)$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "2x_1 & - & 4x_2 & - & x_3 &   &    & = 4 \\\\\n",
    "-x_1 & - & 2x_2 &  &    & - & x_4  & = 4 \\\\\n",
    "    &  & 3x_2 & + & x_3  & + & 2x_4 & = 1 \\\\\n",
    "3x_1 & + & x_2 &   &    & + & 3x_4  & = -3 \\\\\n",
    "\\end{array}\n",
    "\\right.$；\n",
    "\n",
    "(2)$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "x_1 & + & x_2 & + & x_3 & + & x_4 & + & x_5 & = -1 \\\\\n",
    "3x_1 & + & 2x_2 & + & x_3 & + & x_4 & - & 3x_5 & = -5\\\\\n",
    "  &  & x_2 & + & 2x_3 & + & 2x_4 & + & 6x_5 & = 2 \\\\\n",
    "5x_1 & + & 4x_2 & + & 3x_3 & + & 3x_4 & - & x_5 & = -1 \\\\\n",
    "\\end{array}\n",
    "\\right.$；"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "13183e0d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\emptyset$"
      ],
      "text/plain": [
       "EmptySet"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#(1)\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3,x4 = sp.symbols(\"x1 x2 x3 x4\")\n",
    "A = sp.Matrix([[2,-4,-1,0],[-1,-2,0,-1],[0,3,1,2],[3,1,0,3]])\n",
    "b = sp.Matrix([[4],[4],[1],[-3]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3,x4)\n",
    "result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "id": "82a70e7e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "特解：\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( x_{3} + x_{4} + 5 x_{5} - 3, \\  - 2 x_{3} - 2 x_{4} - 6 x_{5} + 2, \\  x_{3}, \\  x_{4}, \\  x_{5}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(x3 + x4 + 5*x5 - 3, -2*x3 - 2*x4 - 6*x5 + 2, x3, x4, x5)}"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#(2)\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3,x4,x5 = sp.symbols(\"x1 x2 x3 x4 x5\")\n",
    "A = sp.Matrix([[1,1,1,1,1],[3,2,1,1,-3],[0,1,2,2,6],[5,4,3,3,-1]])\n",
    "b = sp.Matrix([[-1],[-5],[2],[-7]])\n",
    "b0 = sp.Matrix([[0],[0],[0],[0]])\n",
    "system1 = A,b\n",
    "system0 = A,b0\n",
    "\n",
    "result1 = sp.linsolve(system1,x1,x2,x3,x4,x5)\n",
    "result0 = sp.linsolve(system0,x1,x2,x3,x4,x5)\n",
    "print('特解：')\n",
    "result1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "id": "d8928c1a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "基础解：\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( x_{3} + x_{4} + 5 x_{5}, \\  - 2 x_{3} - 2 x_{4} - 6 x_{5}, \\  x_{3}, \\  x_{4}, \\  x_{5}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(x3 + x4 + 5*x5, -2*x3 - 2*x4 - 6*x5, x3, x4, x5)}"
      ]
     },
     "execution_count": 103,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print('基础解：')\n",
    "result0"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "64858712",
   "metadata": {},
   "source": [
    "所以，当$x_3=0,x_4=0,x_5=0$时，有特解$\\eta_0=\\begin{pmatrix}-3 \\\\ 2 \\\\ 0 \\\\ 0 \\\\ 0 \\end{pmatrix}$,当$x_3=1,x_4=0,x_5=0$时，$\\xi_1=\\begin{pmatrix} 1 \\\\ -2 \\\\ 1 \\\\ 0 \\\\ 0 \\end{pmatrix}$，当$x_3=0,x_4=1,x_5=0$时，$\\xi_2=\\begin{pmatrix} 1 \\\\ -2 \\\\ 0 \\\\ 1 \\\\ 0 \\end{pmatrix}$,当$x_3=0,x_4=0,x_5=1$时，$\\xi_3=\\begin{pmatrix} 5 \\\\ -6 \\\\ 0 \\\\ 0 \\\\ 1 \\end{pmatrix}$,因此，方程组的通解为：$x=\\eta_0+k_1\\xi_1+k_2\\xi_2+k_3\\xi_3(k_1,k_2,k_3\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "220af823",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "3df75641",
   "metadata": {},
   "source": [
    "**<font size=5>5.</font>**求线性方程组的一个基础解系.\n",
    "\n",
    "$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "x_1 & - & 8x_2 & + & 10x_3 & + & 2x_4 & = 0 \\\\\n",
    "2x_1 & + & 4x_2 & + & 5x_3 & - & x_4 & = 0 \\\\\n",
    "3x_1 & + & 8x_2 & + & 6x_3 & - & 2x_4 & = 0 \n",
    "\\end{array}\n",
    "\\right.$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "e2ebe1d0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - 4 x_{3}, \\  \\frac{3 x_{3}}{4} + \\frac{x_{4}}{4}, \\  x_{3}, \\  x_{4}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-4*x3, 3*x3/4 + x4/4, x3, x4)}"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3,x4 = sp.symbols(\"x1 x2 x3 x4\")\n",
    "A = sp.Matrix([[1,-8,10,2],[2,4,5,-1],[3,8,6,-2]])\n",
    "b = sp.Matrix([[0],[0],[0]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3,x4)\n",
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d229705b",
   "metadata": {},
   "source": [
    "所以，当$x_3=1,x_4=0$时,$\\xi_1=\\begin{pmatrix}-1 \\\\ \\frac{3}{4} \\\\ 1 \\\\ 0  \\end{pmatrix}$，当$x_3=0,x_4=1$时，$\\xi_2=\\begin{pmatrix}0 \\\\ \\frac{1}{4} \\\\ 0 \\\\ 1 \\end{pmatrix}$，因此，齐次线性方程组的通解为：$x=k_1\\xi_1+k_2\\xi_2(k_1,k_2\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "597455fd",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "942a3365",
   "metadata": {},
   "source": [
    "**<font size=5>6.</font>**求线性方程组的基础解系与通解.\n",
    "\n",
    "$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "2x_1 & - & 3x_2 & - & 2x_3 & + & x_4 & = 0 \\\\\n",
    "3x_1 & + & 5x_2 & + & 4x_3 & - & 2x_4 & = 0 \\\\\n",
    "8x_1 & + & 7x_2 & + & 6x_3 & - & 3x_4 & = 0 \n",
    "\\end{array}\n",
    "\\right.$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "1a1b7447",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - \\frac{2 x_{3}}{19} + \\frac{x_{4}}{19}, \\  - \\frac{14 x_{3}}{19} + \\frac{7 x_{4}}{19}, \\  x_{3}, \\  x_{4}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-2*x3/19 + x4/19, -14*x3/19 + 7*x4/19, x3, x4)}"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3,x4 = sp.symbols(\"x1 x2 x3 x4\")\n",
    "A = sp.Matrix([[2,-3,-2,1],[3,5,4,-2],[8,7,6,-3]])\n",
    "b = sp.Matrix([[0],[0],[0]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3,x4)\n",
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "19d3e91c",
   "metadata": {},
   "source": [
    "所以，当$x_3=1,x_4=0$时,$\\xi_1=\\begin{pmatrix}-\\frac{2}{19} \\\\ -\\frac{14}{19} \\\\ 1 \\\\ 0  \\end{pmatrix}$，当$x_3=0,x_4=1$时，$\\xi_2=\\begin{pmatrix} \\frac{1}{19} \\\\ \\frac{7}{19} \\\\ 0 \\\\ 1 \\end{pmatrix}$，因此，齐次线性方程组的通解为：$x=k_1\\xi_1+k_2\\xi_2(k_1,k_2\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "dea7e0db",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "db6557ca",
   "metadata": {},
   "source": [
    "**<font size=5>7.</font>**求解线性方程组.\n",
    "\n",
    "$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "x_1 & + & x_2 & - & x_3 & + & 2x_4 & + & x_5 & = 0 \\\\\n",
    "  &   &   &   & x_3 & + & 3x_4 & - & x_5 &= 0 \\\\\n",
    "  &   &   &   & 2x_3 & + & x_4 & - & 2x_5 & = 0 \n",
    "\\end{array}\n",
    "\\right.$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "f20cbdc6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - x_{2}, \\  x_{2}, \\  x_{5}, \\  0, \\  x_{5}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-x2, x2, x5, 0, x5)}"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3,x4,x5 = sp.symbols(\"x1 x2 x3 x4 x5\")\n",
    "A = sp.Matrix([[1,1,-1,2,1],[0,0,1,3,-1],[0,0,2,1,-2]])\n",
    "b = sp.Matrix([[0],[0],[0]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3,x4,x5)\n",
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d3d1bc6f",
   "metadata": {},
   "source": [
    "所以，当$x_2=1,x_5=0$时,$\\xi_1=\\begin{pmatrix} -1 \\\\ 1 \\\\ 0 \\\\ 0 \\\\ 0 \\end{pmatrix}$，当$x_2=0,x_5=1$时，$\\xi_2=\\begin{pmatrix} 0 \\\\ 0 \\\\ 1 \\\\ 0 \\\\ 1 \\end{pmatrix}$，因此，齐次线性方程组的通解为：$x=k_1\\xi_1+k_2\\xi_2(k_1,k_2\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f57a741e",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "2b6ecd26",
   "metadata": {},
   "source": [
    "**<font size=5>8.</font>**解线性方程组.\n",
    "\n",
    "(1)$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "x_1 & + & x_2 &   &   &   &   & = 5 \\\\\n",
    "2x_1 & + & x_2 & + & x_3 & + & 2x_4 & = 1 \\\\\n",
    "5x_1 & + & 3x_2 & + & 2x_3 & + & 2x_4 & = 3 \n",
    "\\end{array}\n",
    "\\right.$，\n",
    "\n",
    "(2)$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "x_1 & - & 5x_2 & + & 2x_3 & - & 3x_4 & = 11 \\\\\n",
    "5x_1 & + & 3x_2 & + & 6x_3 & - & x_4 & = -1 \\\\\n",
    "2x_1 & + & 4x_2 & + & 2x_3 & + & x_4 & = -6 \n",
    "\\end{array}\n",
    "\\right.$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "id": "36de0a85",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "特解:\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - x_{3} - 8, \\  x_{3} + 13, \\  x_{3}, \\  2\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-x3 - 8, x3 + 13, x3, 2)}"
      ]
     },
     "execution_count": 105,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#(1)\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3,x4 = sp.symbols(\"x1 x2 x3 x4\")\n",
    "A = sp.Matrix([[1,1,0,0],[2,1,1,2],[5,3,2,2]])\n",
    "b = sp.Matrix([[5],[1],[3]])\n",
    "b0 = sp.Matrix([[0],[0],[0]])\n",
    "system1 = A,b\n",
    "system0 = A,b0\n",
    "\n",
    "result0 = sp.linsolve(system0,x1,x2,x3,x4)\n",
    "result1 = sp.linsolve(system1,x1,x2,x3,x4)\n",
    "print('特解:')\n",
    "result1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "id": "2f2b8d58",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "基础解:\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - x_{3}, \\  x_{3}, \\  x_{3}, \\  0\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-x3, x3, x3, 0)}"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print('基础解:')\n",
    "result0"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b9dfee07",
   "metadata": {},
   "source": [
    "所以，当$x_3=0$时,有特解$\\eta_0=\\begin{pmatrix} -8 \\\\ 13 \\\\ 0 \\\\ 2 \\end{pmatrix}$，当$x_3=1$时，有基础解$\\xi_1=\\begin{pmatrix} -1 \\\\ 1 \\\\ 1 \\\\ 0 \\end{pmatrix}$，因此，非齐次线性方程组的通解为：$x=\\eta_0+k_1\\xi_1(k_1\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "98782fb0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "特解:\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - \\frac{9 x_{3}}{7} + \\frac{x_{4}}{2} + 1, \\  \\frac{x_{3}}{7} - \\frac{x_{4}}{2} - 2, \\  x_{3}, \\  x_{4}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-9*x3/7 + x4/2 + 1, x3/7 - x4/2 - 2, x3, x4)}"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#(2)\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3,x4 = sp.symbols(\"x1 x2 x3 x4\")\n",
    "A = sp.Matrix([[1,-5,2,-3],[5,3,6,-1],[2,4,2,1]])\n",
    "b = sp.Matrix([[11],[-1],[-6]])\n",
    "b0 = sp.Matrix([[0],[0],[0]])\n",
    "system1 = A,b\n",
    "system0 = A,b0\n",
    "\n",
    "result0 = sp.linsolve(system0,x1,x2,x3,x4)\n",
    "result1 = sp.linsolve(system1,x1,x2,x3,x4)\n",
    "print('特解:')\n",
    "result1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "id": "1622f0ab",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "基础解：\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - \\frac{9 x_{3}}{7} + \\frac{x_{4}}{2}, \\  \\frac{x_{3}}{7} - \\frac{x_{4}}{2}, \\  x_{3}, \\  x_{4}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-9*x3/7 + x4/2, x3/7 - x4/2, x3, x4)}"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print('基础解：')\n",
    "result0"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "714d0416",
   "metadata": {},
   "source": [
    "所以，当$x_3=0,x_4=0$时,有特解$\\eta_0=\\begin{pmatrix} 1 \\\\ -2 \\\\ 0 \\\\ 0 \\end{pmatrix}$，当$x_3=1,x_4=0$时，有基础解$\\xi_1=\\begin{pmatrix} -\\frac{2}{7} \\\\ -\\frac{13}{7} \\\\ 1 \\\\ 0 \\end{pmatrix}$，当$x_3=0,x_4=1$时，有基础解$\\xi_2=\\begin{pmatrix} \\frac{1}{2} \\\\ -\\frac{1}{2} \\\\ 0 \\\\ 1 \\end{pmatrix}$，因此，非齐次线性方程组的通解为：$x=\\eta_0+k_1\\xi_1+k_2\\xi_2(k_1,k_2\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "93f45f06",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "0f12d1ff",
   "metadata": {},
   "source": [
    "**<font size=5>9.</font>**已知线性方程组\n",
    "\n",
    "(1)$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "x_1 & + & x_2 & + & x_3 & = 0 \\\\\n",
    "ax_1 & + & bx_2 & + & cx_3 & = 0 \\\\\n",
    "a^2x_1 & + & b^2x_2 & + & c^2x_3 & = 0 \n",
    "\\end{array}\n",
    "\\right.$.\n",
    "\n",
    "(1)a,b,c满足何种关系时，方程组仅有零解？\n",
    "\n",
    "(2)a,b,c满足何种关系时，方程组有无穷多组解，并用基础解系表示全部解."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "id": "de257149",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[(a, c, c), (b, b, c), (c, b, c)]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "a,b,c = sp.symbols(\"a b c\")\n",
    "M = sp.Matrix([[1,1,1],[a,b,c],[a*a,b*b,c*c]])\n",
    "print(sp.solve(M.det(),a,b,c))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1222133f",
   "metadata": {},
   "source": [
    "有非零解时，$M=0$,此时有3种情况，分别为$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "a & = a \\\\\n",
    "b & = c \\\\\n",
    "c & = c \n",
    "\\end{array}\n",
    "\\right.$或$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "a & = b \\\\\n",
    "b & = b \\\\\n",
    "c & = c \n",
    "\\end{array}\n",
    "\\right.$\n",
    "或$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "a & = c \\\\\n",
    "b & = b \\\\\n",
    "c & = c \n",
    "\\end{array}\n",
    "\\right.$即$b=c$或$a=b$或$a=c$\n",
    "\n",
    "那么方程组仅有零解时，$b\\neq{c}$且$a\\neq{b}$且$a\\neq{b}$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "94a732fe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - x_{2} - x_{3}, \\  x_{2}, \\  x_{3}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-x2 - x3, x2, x3)}"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#如果a=b=c\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3 = sp.symbols(\"x1 x2 x3\")\n",
    "A = sp.Matrix([[1,1,1]])\n",
    "b = sp.Matrix([[0]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3)\n",
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c171606b",
   "metadata": {},
   "source": [
    "所以，当$x_2=1,x_3=0$时,有$\\xi_1=\\begin{pmatrix} -1 \\\\ 1 \\\\ 0 \\end{pmatrix}$，当$x_2=0,x_3=1$时，有$\\xi_2=\\begin{pmatrix} -1 \\\\ 0 \\\\ 1 \\end{pmatrix}$，此时基础解系为：$k_1\\xi_1+k_2\\xi_2(k_1,k_2\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "id": "24e9364f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - x_{2}, \\  x_{2}, \\  0\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-x2, x2, 0)}"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#如果a=b=k,或a=c=k，或b=c=k，\n",
    "import sympy as sp\n",
    "\n",
    "x1,x2,x3 = sp.symbols(\"x1 x2 x3\")\n",
    "a1,a2 = sp.symbols(\"a1 a2\")\n",
    "A = sp.Matrix([[1,1,1],['a1','a1','a2'],['a1*a1','a1*a1','a2']])\n",
    "b = sp.Matrix([[0],[0],[0]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3)\n",
    "result"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "071cced6",
   "metadata": {},
   "source": [
    "所以，当$x_2=1$时,有$\\xi_1=\\begin{pmatrix} -1 \\\\ 1 \\\\ 0 \\end{pmatrix}$，此时基础解系为：$k_1\\xi_1(k_1\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8826b291",
   "metadata": {},
   "source": [
    "**<font size=5>10.</font>**$\\lambda$为何值时，方程组$\\left\\{\n",
    "\\begin{array}{rcrcrc}\n",
    "2x_1 & + & \\lambda{x_2} & - & x_3 & = 1 \\\\\n",
    "\\lambda{x_1} & - & x_2 & + & x_3 & = 2 \\\\\n",
    "4x_1 & + & 5x_2 & - & 5x_3 & = -1 \n",
    "\\end{array}\n",
    "\\right.$无解？有唯一解或有无穷多解？并在有无穷多解时写出方程组得通解."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "id": "1cb75017",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[-4/5, 1]"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#唯一解\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "\n",
    "lambda1 = sp.Symbol(\"lambda\")\n",
    "M = sp.Matrix([[2,lambda1,-1],[lambda1,-1,1],[4,5,-5]])\n",
    "sp.solve(M.det(),lambda1)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "30a40c2e",
   "metadata": {},
   "source": [
    "当$\\lambda\\neq{-\\frac{4}{5}或1}$时，方程组有唯一解"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "3c82a5ac",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\emptyset$"
      ],
      "text/plain": [
       "EmptySet"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#λ=-4/5\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "from sympy import Rational\n",
    "\n",
    "x1,x2,x3 = sp.symbols(\"x1 x2 x3\")\n",
    "A = sp.Matrix([[2,Rational(-4,5),-1],[Rational(-4,5),-1,1],[4,5,-5]])\n",
    "b = sp.Matrix([[1],[2],[-1]])\n",
    "system1 = A,b\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3)\n",
    "result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "c51d9c78",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "特解：\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( 1, \\  x_{3} - 1, \\  x_{3}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(1, x3 - 1, x3)}"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#λ=1\n",
    "import numpy as np\n",
    "import sympy as sp\n",
    "from sympy import Rational\n",
    "\n",
    "x1,x2,x3 = sp.symbols(\"x1 x2 x3\")\n",
    "A = sp.Matrix([[2,1,-1],[1,-1,1],[4,5,-5]])\n",
    "b = sp.Matrix([[1],[2],[-1]])\n",
    "b0 = sp.Matrix([[0],[0],[0]])\n",
    "system1 = A,b\n",
    "system0 = A,b0\n",
    "\n",
    "result0 = sp.linsolve(system0,x1,x2,x3)\n",
    "\n",
    "result = sp.linsolve(system1,x1,x2,x3)\n",
    "print('特解：')\n",
    "result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "id": "3f6036d5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "基础解：\n"
     ]
    },
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( 0, \\  x_{3}, \\  x_{3}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(0, x3, x3)}"
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "print('基础解：')\n",
    "result0"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3ada7d0c",
   "metadata": {},
   "source": [
    "所以，当$x_3=1$时，特解$\\eta_0=\\begin{pmatrix} 1 \\\\ 0 \\\\ 1 \\end{pmatrix}$，当$x_3=1$时，$\\xi_0=\\begin{pmatrix} 0 \\\\ 1 \\\\ 1 \\end{pmatrix}$，那么方程组的通解为$\\eta_0+k_1\\xi_1(k_1\\in\\mathbb{R})$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b713fa55",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
